from flask_restx import reqparse, Resource, Api as _Api


# class Api(_Api):
#     def handle_error(self, e):
#         raise e
from werkzeug.exceptions import HTTPException


class Api(_Api):

    def handle_error(self, e):
        raise e


# class Api(_Api):
#     def error_router(self, original_handler, e):
#         """ Override original error_router to only handle HTTPExceptions. """
#         if self._has_fr_route() and isinstance(e, HTTPException):
#             try:
#                 return self.handle_error(e)
#             except Exception:
#                 pass  # Fall through to original handler
#         return original_handler(e)
